<?php
namespace frontend\controllers;
use common\components\FrontBaseController;
use frontend\models\Posts;
use Yii;
use \common\helps\tools;
use \common\helps\code;

/**
 * Posts controller
 */
class PostsController extends FrontBaseController
{

    public $modelClass = 'frontend\models\Posts';
    public function init()
    {
        parent::init();
    }

    /**
     * 获取热门讨论的帖子或者项目
     * @author hey_heyang(635870453@qq.com)
     * @return json
     */
    public  function  actionGetHotComment(){
        $model = new Posts();
        $data = $model->getHotComment();
        return code::success($data);


    }

}
